<?php
if ($resultats != null) {
    ?>
    <table data-role="table" id="table_liste_fichiers" data-mode="columntoggle"  id="tableau_codes">
        <thead>
            <tr>
                <th class="th_tableau" >Désignation </th>
                <th class="th_tableau" >Login </th>
                <th class="th_tableau">Mot de passe</th>
                <th class="th_tableau" data-priority="1">lien / adresse</th>
                <th class="th_tableau" data-priority="2">commentaire</th>
                <th class="th_tableau" data-priority="3">commentaire 2</th>
                <th class="th_tableau" data-priority="4">divers</th>                                
             </tr>     
        </thead>
        <tbody>        
            <?php
            foreach ($resultats as $valeur) {
                ?>
                <tr>
                    <td class="case_designation">
                        <a  style="color:#222" href="index.php?page=codes&id_client=<?php echo $valeur->idClient; ?>&id_code=<?php echo $valeur->idCode; ?>" class="aff_infos_codes"><?php
                        	 echo de_remplacer_cote($valeur->designationCode); 
                       ?></a>
                    </td>
                    <td class="case_login">
                        <a style="color:#222" href="index.php?page=codes&id_client=<?php echo $valeur->idClient; ?>&id_code=<?php echo $valeur->idCode; ?>"><?php 
                        	echo de_remplacer_cote($valeur->loginCode); 
                        ?></a>
                    </td>
                    <td class="case_mdp">
                        <a style="color:#222" href="index.php?page=codes&id_client=<?php echo $valeur->idClient; ?>&id_code=<?php echo $valeur->idCode; ?>"><?php 
                        	echo de_remplacer_cote($valeur->motDePasseCode); 
                        ?></a>
                    </td>
                    <td class="case_mdp">
                        <a style="color:#222" href="index.php?page=codes&id_client=<?php echo $valeur->idClient; ?>&id_code=<?php echo $valeur->idCode; ?>"> <?php 
                        	echo de_remplacer_cote($valeur->lienAdresseCode); 
                        ?></a>
                    </td>
                    <td class="case_mdp">
                        <a style="color:#222" href="index.php?page=codes&id_client=<?php echo $valeur->idClient; ?>&id_code=<?php echo $valeur->idCode; ?>"><?php 
                        	echo de_remplacer_cote($valeur->commentaireCode); 
                        ?></a>
                    </td>
                    <td class="case_mdp">
                        <a style="color:#222" href="index.php?page=codes&id_client=<?php echo $valeur->idClient; ?>&id_code=<?php echo $valeur->idCode; ?>"><?php 
                        	echo de_remplacer_cote($valeur->commentaire2Code); 
                        ?></a>
                    </td>
                    <td class="case_mdp">
                        <a style="color:#222" href="index.php?page=codes&id_client=<?php echo $valeur->idClient; ?>&id_code=<?php echo $valeur->idCode; ?>"><?php
                        	 echo de_remplacer_cote($valeur->diversCode); 
                        ?></a>
                    </td>
                </tr>
              <?php                 
            }
            ?>
        </tbody>
    </table>
    <?php
} 

else 
    include_once 'module_codes/vues/vue_aucun_code.php';

?>